#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <memory>
#include <getopt.h>
#include <string.h>
#include <sys/time.h>
#include <iomanip>
#include <fstream>
#include <functional>
#include <inttypes.h>
#include <signal.h>
#include "Emulator.h"

extern void set_abort();
void sigint_handler(int sig)
{
    if(sig == SIGINT) {
        printf("\nCtrl + C pressed!\n");
        set_abort();
    }
}

int main(int argc, const char** argv)
{
    signal(SIGINT, sigint_handler);

    auto emu = Emulator(argc, argv);

    emu.execute();

    int display_trapinfo(uint64_t max_cycles);
    int ret = display_trapinfo(emu.get_max_cycles());

    return 0;
}